package Offer2018;

import java.util.Arrays;

public class Variable {
    static int s;
    int i;
    int j;
    {
        int i = 1;
        i++;
        j++;
        s++;
    }

    public void test(int j){
        j++;
        i++;
        s++;
    }

    public static void main(String[] args) {
        String s = "a";
        Variable v1 = new Variable();//s=1
        Variable v2 = new Variable();//s=2
        v1.test(1);//v1.i=1,s=3
        v1.test(1);//v1.i=2,s=4
        v2.test(1);//v2.i=1,s=5
        System.out.println(v1.i+","+v1.j+","+v1.s);//2,1,5
        System.out.println(v2.i+","+v2.j+","+v2.s);//1,1,5
    }

}
